from google.appengine.ext import db
from google.appengine.tools import bulkloader
import models

# At the moment just looking at importing chapters and books. But later will do other things too.


class ChapLoader(bulkloader.Loader):
    def __init__(self):
        bulkloader.Loader.__init__(self, 'Chapter',
                                   [('translation', str),
                                    ('bookno', int),
                                    ('chapno', int),
                                    ('versescount', int),
                                    ('content', str),
                                   ])


class BookLoader(bulkloader.Loader):
    def __init__(self):
        bulkloader.Loader.__init__(self, 'Book',
                                   [('translation', str),
                                    ('bookno', int),
                                    ('bookname', str),
                                    ('chapcount', int),
                                   ])

loaders = [ChapLoader, BookLoader]

